//
//  ReadViewCell.m
//  liang ping
//
//  Created by lanou on 16/3/11.
//  Copyright © 2016年 孙金龙. All rights reserved.
//

#import "ReadViewCell.h"
#import "UIImageView+WebCache.h"
@implementation ReadViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        self.imageview = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, (KWidth-20)/3, (self.frame.size.height))];
        [self.contentView addSubview:self.imageview];
        self.imageview.userInteractionEnabled = YES;
        self.label = [[UILabel alloc] initWithFrame:CGRectMake(0, self.frame.size.height*2/3, 112, 30)];
        // _label.backgroundColor = [UIColor orangeColor];
        self.label.textColor = [UIColor whiteColor];
        self.littleLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.frame.size.width-35, self.frame.size.height*2/3+10, 50, 15)];
        _littleLabel.font = [UIFont systemFontOfSize:11];
        self.littleLabel.textColor = [UIColor whiteColor];
        
        [self.contentView addSubview:_label];
        [self.contentView addSubview:_littleLabel];
    }
    return self;
}

- (void)setModel:(ProductModel *)model
{
    [self.imageview sd_setImageWithURL:[NSURL URLWithString:model.coverimg]];
    self.label.text = model.name;
    self.littleLabel.text = model.enname;
    // NSLog(@"======%@",model.enname);
}



@end
